home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbtable.dxr / 00014_Platform, File io.ls < prev    next >
Encoding:
Text File  |  2000-01-18  |  1.4 KB  |  73 lines

  1. global gDBTableVarList
  2.  
  3. on LinkCast
  4.   MyObj = getaProp(gDBTableVarList, GetObjProp())
  5.   LibraryName = GetLibraryName(MyObj)
  6.   FolderPath = getTableFolder()
  7.   PathList = duplicate(the searchPath)
  8.   PathList = LinearListAddifNew(PathList, the moviePath)
  9.   PrevPathandName = castLib("tabled.cst").fileName
  10.   repeat with rc in PathList
  11.     if FileExists(rc & FolderPath & LibraryName) = 0 then
  12.       castLib("tabled.cst").fileName = rc & FolderPath & LibraryName
  13.       exit repeat
  14.     end if
  15.   end repeat
  16. end
  17.  
  18. on GetCastPathList
  19.   if count(the searchPath) = 0 then
  20.     xPath = [the moviePath]
  21.   else
  22.     xPath = the searchPath
  23.   end if
  24.   return xPath
  25. end
  26.  
  27. on getTableFolder
  28.   if the machineType = 256 then
  29.     xFolder = "tblcast\"
  30.   else
  31.     xFolder = "tblcast:"
  32.   end if
  33.   return xFolder
  34. end
  35.  
  36. on GetTextExtension
  37.   if the machineType = 256 then
  38.     Extension = ".wri"
  39.   else
  40.     Extension = EMPTY
  41.   end if
  42.   return Extension
  43. end
  44.  
  45. on GetSavePathandName xName
  46.   unLoad()
  47.   FileioObj = new(xtra("fileio"))
  48.   if not objectp(FileioObj) then
  49.     beep()
  50.   else
  51.     pathAndName = displaySave(FileioObj, "Where would you like to save?", xName)
  52.     FileioObj = 0
  53.     return pathAndName
  54.   end if
  55. end
  56.  
  57. on IsKeyBoardEquivalentDown
  58.   if the machineType = 256 then
  59.     return the controlDown
  60.   else
  61.     return the commandDown
  62.   end if
  63. end
  64.  
  65. on GetTextFilePath
  66.   if the machineType = 256 then
  67.     xPath = the pathName & "tbldata\"
  68.   else
  69.     xPath = the pathName & "tbldata:"
  70.   end if
  71.   return xPath
  72. end
  73.